<template>
  <div class="yf-plane">
      <div class="plane">
        <div class="top">
         <div class="left">
           <span class="iconfont" :class="icon"></span>
           <span class="title">{{title}}</span>
         </div>
          <span class="btn" @click="click" v-if="btnText">{{btnText}}</span>
        </div>
        <div class="main">
          <slot></slot>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    btnText: String,
    icon: String,
    title: String
  },
  methods: {
    click () {
      this.$emit('click')
    }
  }
}
</script>

<style scoped lang="stylus">
  .yf-plane
    padding 0px 5px
    .plane
      background:rgba(255,255,255,1);
      box-shadow:0px 3px 7px 0px rgba(89,88,87,0.52);
      border-radius:10px;
      .top
        display flex
        align-items center
        justify-content space-between
        height 50px
        padding-left 11px
        .btn
          color red
          dpr-font(14px)
          margin-right 20px
        .iconfont
          color #F9A528
          dpr-font(18px)
        .title
          margin-left 10px
          dpr-font(14px)
          color:rgba(85,84,93,1);

</style>
